package com.lc.rongzecaifu.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.lc.rongzecaifu.conn.JsonBorrowindex;
import com.lc.rongzecaifu.rongzecaifu.R;

import java.util.List;


/**
 * Created by Administrator on 2016/11/16.
 */
public class AnswerQuestionAdapter extends BaseAdapter {
    private Context mContext;

    private List<JsonBorrowindex.Info.ListContent> stuList;
    public AnswerQuestionAdapter(Context mContext,List<JsonBorrowindex.Info.ListContent> stuList) {
        super();
        this.mContext = mContext;
        this.stuList=stuList;
    }

    @Override
    public int getCount() {
        return stuList.size();
    }

    @Override
    public Object getItem(int i) {
        return i;
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        if (view == null) {
            view = LayoutInflater.from(mContext).inflate(
                    R.layout.adapter_list, viewGroup, false);
        }
        //   TextView tv = BaseViewHolder.get(view, R.id.tv_num);
        TextView textView = com.lc.rongzecaifu.ui.BaseViewHolder.get(view, R.id.tv_num);

        textView.setText(stuList.get(i).name);
        return view;
    }

}
